package com.chuangke.framework.flow;

import com.baomidou.mybatisplus.extension.service.IService;
import com.chuangke.framework.service.BatchOrderFlowService;
import com.chuangke.framework.util.OrderFlowUtils;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@SuppressWarnings({ "rawtypes", "unchecked" })
public class DefaultOrderFlowServiceImpl<T extends IService> implements BatchOrderFlowService {

	@Autowired
	protected T daoService;

	@Override
	public void submitBatch(List<String> orderIdList) {
		OrderFlowUtils.submitBatch(daoService, orderIdList);
	}

	@Override
	public void cancelSubmitBatch(List<String> orderIdList) {
		OrderFlowUtils.cancelSubmitBatch(daoService, orderIdList);
	}

	@Override
	public void rejectBatch(List<String> orderIdList) {
		OrderFlowUtils.rejectBatch(daoService, orderIdList);
	}

	@Override
	public void completeBatch(List<String> orderIdList) {
		OrderFlowUtils.completeBatch(daoService, orderIdList);
	}

}
